<?php

namespace app\admin\app\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property integer $type  类型
 * @property integer $admin_id 用户
 * @property string $url 地址
 * @property string $name 说明
 * @property string $params 参数
 * @property string $ip IP
 * @property string $create_at 时间
 * @property string $action_name 备注
 */
class ActionLog extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_action_log';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;
    public $guarded=[];


    function getIpTextAttribute(){
        $ip = $this->attributes['ip'];
        $value=$ip."(". ipFind($ip). ")";
        return $value;
    }
    
}
